<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<div id="div1" style="background-color: red; width: 400px; height: 400px;">
			<div id="div2" style="background-color: aqua; width: 200px; height: 12.5rem;">
				<input type="image" src="" />
				<p class="baseP">p1</p>
				<p class="baseP">p2</p>
			</div>
		</div>
		
		<div id="div3">
				<p class="baseP">p3</p>
		</div>
		<p class="baseP">p4</p>
		<p class="baseP">p5</p>
		
		<ul id="ul1">
			
		</ul>
		<button type="button" onclick="foundById()">根据类找</button>
		<button type="button" onclick="foundByClassname()">根据id找</button>
		<button type="button" onclick="foundByTag()">根据标签找</button>
	</body>
<!-- 	2.新制作一个页面，要求：
	       2.1 至少包含以下元素：3个DIV,标题，5个P标签，图片，列表 
	       2.2 分别实现 id,类，标签三种方式查找以上元素 -->
	<script type="text/javascript">
		function foundById(){
			var divId = document.getElementsByTagName('ul1');
			console.log(divId);
		}
		function foundByClassname(){
			var divClassName = document.getElementsByClassName('baseP');
			console.log(divClassName);
		}
		function foundByTag(){
			var divTagName = document.getElementsByTagName('div');
			console.log(divTagName);
		}
	</script>
</html>
